/*
 * JMiniInfo.java
 *
 * Created on 8 de marzo de 2008, 14:22
 */

package org.perfectday.main.dummyengine.model;

import java.awt.Font;
import org.perfectday.logicengine.model.minis.Mini;

/**
 *
 * @author  Miguel Angel Lopez Montellano ( alakat@gmail.com )
 */
public class JMiniInfo extends javax.swing.JPanel {
    
    /** Creates new form JMiniInfo */
    public JMiniInfo() {
        initComponents();
        this.setFont(new Font("Comic Sanz",Font.ITALIC,12));
    }
    
    
    public void setMini(Mini mini){
        this.attributePanel.setMini(mini);
        this.lMini.setText(mini.getName()+"::"+mini.getMiniLevel()+"/"+mini.getAbstractName());
    }
    
//    public void setMini(Mini mini){
//        this.lAtaque.setText(""+mini.getAtak());
//        this.lDefensa.setText(""+mini.getDefense());
//        this.lFueza.setText(""+mini.getStrength());
//        this.lIniciativa.setText(""+mini.getIniciative());
//        this.lMagic.setText(""+mini.getMagicAfinity());
//        this.lMovement.setText(""+mini.getMoviment());
//        this.lResistencia.setText(""+mini.getResistance());
//        this.lVitalidad.setText(((int)(((mini.getVitality()*100))-(mini.getDamage()*100)))
//                +"/"+((int)(mini.getVitality())*100));
////        this.lVitalidad.setText(mini.getVitality()+"/"+mini.getDamage());
//        if(mini.getPrimaryAction()!=null)
//            this.lPrimaryAtack.setText(mini.getPrimaryAction().toString());
//        if(mini.getSecondaryAction()!=null)
//            this.lSecondAtack.setText(mini.getSecondaryAction().toString());
//        if(mini.getConterAtackAction()!=null)
//            this.lConterAtack.setText(mini.getConterAtackAction().toString());
//        else
//            this.lConterAtack.setText("No contra ataca");
//        this.lMini.setText(mini.getName()+"::"+mini.getMiniLevel()+"/"+mini.getAbstractName());
//    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        dummyDegradateYellowBar1 = new org.perfectday.main.dummyengine.component.DummyDegradateYellowBar();
        lMini = new javax.swing.JLabel();
        attributePanel = new org.perfectday.main.dummyengine.component.DummyAttributeMiniPanel();

        javax.swing.GroupLayout dummyDegradateYellowBar1Layout = new javax.swing.GroupLayout(dummyDegradateYellowBar1);
        dummyDegradateYellowBar1.setLayout(dummyDegradateYellowBar1Layout);
        dummyDegradateYellowBar1Layout.setHorizontalGroup(
            dummyDegradateYellowBar1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 130, Short.MAX_VALUE)
        );
        dummyDegradateYellowBar1Layout.setVerticalGroup(
            dummyDegradateYellowBar1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE)
        );

        lMini.setText("jLabel8");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lMini)
                    .addComponent(attributePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(28, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lMini)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(attributePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(13, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents
    
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private org.perfectday.main.dummyengine.component.DummyAttributeMiniPanel attributePanel;
    private org.perfectday.main.dummyengine.component.DummyDegradateYellowBar dummyDegradateYellowBar1;
    private javax.swing.JLabel lMini;
    // End of variables declaration//GEN-END:variables
    
}
